﻿using Swimj.CommonLib.Attributes;
using Swimj.CommonLib.Base;

namespace Admin.CommonLib.Models.User
{
    public class UserTemplateResponseDto : ImportTemplateResponseDto
    {
        [ExcelColumn(DisplayText = "用户名", Required = true)]
        public string? UserName { get; set; }

        [ExcelColumn(DisplayText = "姓名", Required = true)]
        public string? RealName { get; set; }

        [ExcelColumn(DisplayText = "邮箱", Required = true)]
        public string? Email { get; set; }

        [ExcelColumn(DisplayText = "联系电话", Required = true)]
        public string? Phone { get; set; }

        [ExcelColumn(DisplayText = "出生日期")]
        public DateTime? Birthday { get; set; }

        [ExcelColumn(DisplayText = "性别")]
        public string? Sex { get; set; }

        [ExcelColumn(DisplayText = "描述")]
        public string? Description { get; set; }

        // [ExcelColumn(DisplayText = "数据状态", Required = true)]
        // public int DataState { get; set; } = 1;
    }

    public class UserImportResponseDto : UserTemplateResponseDto
    {
        public UserImportResponseDto()
        {
        }

        public UserImportResponseDto(UserTemplateResponseDto baseResponseDto)
        {
            this.Row = baseResponseDto.Row;
            this.UserName = baseResponseDto.UserName;
            this.RealName = baseResponseDto.RealName;
            this.Phone = baseResponseDto.Phone;
            this.Email = baseResponseDto.Email;
            this.Birthday = baseResponseDto.Birthday;
            this.Sex = baseResponseDto.Sex;
            this.Description = baseResponseDto.Description;
        }

        public string? ErrorMessage { get; set; }
    }
}